package org.security.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author jt
 * @version 1.0
 * @date 2024/6/25 17:16
 */

@ConfigurationProperties(prefix = "free-security")
public class FreeProperties {
    //开启认证
    @Value("${free-security.authEnable:false}")
    private Boolean authEnable;

    //开启授权
    @Value("${free-security.authorizeEnable:false}")
    private Boolean authorizeEnable;

    private Boolean requestDataEnable = false;

    /**
     * request.header(key)
     */
    @Value("${free-security.tokenKey:token}")
    private String tokenKey ;

    public Boolean getAuthEnable() {
        return authEnable;
    }

    public void setAuthEnable(Boolean authEnable) {
        this.authEnable = authEnable;
    }

    public Boolean getAuthorizeEnable() {
        return authorizeEnable;
    }

    public void setAuthorizeEnable(Boolean authorizeEnable) {
        this.authorizeEnable = authorizeEnable;
    }

    public Boolean getRequestDataEnable() {
        return requestDataEnable;
    }

    public void setRequestDataEnable(Boolean requestDataEnable) {
        this.requestDataEnable = requestDataEnable;
    }

    public String getTokenKey() {
        return tokenKey;
    }

    public void setTokenKey(String tokenKey) {
        this.tokenKey = tokenKey;
    }
}
